﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Microsoft.Practices.Unity;

using ePlanet.SingleWell.Services;
using System.Data;

namespace Web.HttpHandles
{
    public partial class SinglewellStatisticsHandler : PageBase
    {
        [Dependency]
        public ISingleWellService m_ISingleWellService
        {
            get;
            set;
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            string op = Request.QueryString["op"];
            string resultJson = string.Empty;
            if (op.Equals("getsinglewellstastistics"))
            {
                DataTable table = m_ISingleWellService.StatisticsSinglewellWorkMode();
                resultJson = DataTableToJson.ToJson(table);
            }
            Response.ContentType = "text/json";
            Response.Write(resultJson);
        }
    }
}